struct Duration <: AbstractTimeSpan
    value::Int4Span
end

@inline value(x::Duration) = x.value

@inline Duration(x::Duration) = x

@inline Base.eltype(::Type{Duration}) = Int4Time
@inline Base.eltype(x::T) where T<: AbstractTimeSpan = typeof(x.value)

function Duration(value::T) where T<:Base.Dates.Period
     Duration( (T === Month || T === Year) ? Months(value) : Nanoseconds(value) )
end

Base.zero(::Type{T}) where T<:AbstractTimeSpan = T(zero(eltype(T)))

Base.isequal(x::T, y::T) where T<:AbstractTimeSpan = isequal(value(x), value(y))
Base.isless(x::T, y::T) where T<:AbstractTimeSpan = isless(value(x), value(y))
Base.:(==)(x::T, y::T) where T<:AbstractTimeSpan = (==)(value(x), value(y))
Base.:(<)(x::T, y::T) where T<:AbstractTimeSpan = (<)(value(x), value(y))
Base.:(<=)(x::T, y::T) where T<:AbstractTimeSpan = (<=)(value(x), value(y))
